<template>
	<view class="remain-card" @click="handleClick" :style="[{background:isShowBtn&&'#0089FF'||rusult=='批准'&&'#41ac43'||rusult=='驳回'&&'#e67c7c'}]">
		<view class="content">
			<view class="view-inforn">
				<view class="view-inforn-sub">
					<view class="msg">{{propMsg}}</view>
				</view>
				<view class="view-inforn-su2" v-if="type=='kaoqin'">
					<view class="kaoqin-sub">
						<view class="inforn-titel">班组信息:</view>
						<view class="inforn" v-if="workInfon=='3'">全日</view>
						<view class="inforn" v-if="workInfon=='1'">上下午</view>
						<view class="inforn" v-if="workInfon=='2'">夜班</view>	
					</view>
					<view class="kaoqin-status">
						<view class="kaoqin-status-title">状态:</view>
						<view>
							<text v-if="status == 0">未通过</text>
							<text v-else-if="status == 1">已通过</text>
							<text v-else-if="status == 2">进行中</text>
							<text v-else-if="status == 3">已提交</text>
							<text v-else-if="status == -1">自由</text>
						</view>
					</view>
				</view>
				<view class="salary" v-if="type=='salary'">
					<view class="salarytable-type">工资类型:</view>
					<view class="salarytable-type">{{salaryTableType}}</view>
				</view>
			</view>
			<view class="btn" v-if="isShowBtn">查看</view>
			<view class="result" v-if="!isShowBtn">{{rusult}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "remainThingCard",
		data() {
			return {
				// msg:this.propMsg
			};
		},
		props: {
			propMsg:{
				type:String,
				default:''
			},
			workInfon:'',
			bgColor:{
				default:'#3d91ff'
			},
			isShowBtn:{
				type:Boolean,
				default:true
			},
			status:'',
			rusult:'',
			type:'',
			salaryTableType:'',
		},
		methods: {
			handleClick() {
				this.$emit('handleClick')
			},
			// changeMsg(msg){
			// 	let month = msg.split('[')[1].split(']')[0]
			// 	this.msg= msg.replace(']','月').replace('[','')
			// 	// console.log(this.msg)
			// }
		},
		watch: {
			
		},
		computed: {
			changeMsg(){
				// let month = this.propMsg.split('[')[1].split(']')[0]
				// let msg= this.propMsg.replace(']','月').replace('[','')
				// return msg
				// console.log(this.msg)
			}
		},
		created() {
			// this.changeMsg(this.propMsg)
		}
	}
</script>

<style lang="scss" scoped>
	.remain-card {
		box-shadow: 0px 4px 12px 0px rgba(70, 66, 130, 0.1);
		border-radius: 16rpx;
		.content {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 16rpx 24rpx;

			.view-inforn {
				display: flex;
				flex-direction: column;
				.view-inforn-sub{
					display: flex;
					align-items: center;
				}
				.view-inforn-su2{
					display: flex;
					justify-content: space-between;
					font-size: 26rpx;
					margin-top: 10rpx;
					margin-left: 6rpx;
					color: #ffffff;
					.kaoqin-sub{
						display: flex;
					}
					.kaoqin-status{
						display: flex;
						font-size: 26rpx;
						color: #ffffff;
						padding-right: 20rpx;
						height: 40rpx;
						.kaoqin-status-title{
							margin-right: 10rpx;
						}
					}
					.inforn-titel{
						margin-right: 15rpx;
					}
				}
				.salary{
					font-size: 26rpx;
					color: #ffffff;
					margin-top: 20rpx;
					display: flex;
					.salarytable-type{
						margin-right: 20rpx;
					}
				}
				.icon {
					width: 24rpx;
					height: 24rpx;
					background: #ffffff;
					margin-right: 10rpx;
					border-radius: 50%;
				}

				.msg {
					font-size: 30rpx;
					padding: 0 10rpx;
					color: #FFFFFF;
				}
			}
		}

		.btn {
			width: 80rpx;
			text-align: end;
			font-size: 28rpx;
			padding: 30rpx 0 ;
			color: #FFFFFF;
			border-left: 2rpx solid #FFFFFF;
		}
		.result{
			width: 100rpx;
			text-align: end;
			font-size: 30rpx;
			padding: 30rpx 0 ;
			font-weight: 600;
			color: #f3f3f3;
			border-left: 2rpx solid #FFFFFF;
		}
	}
</style>
